package com.alibaba.cloud.transmit.service.impl;

import com.alibaba.cloud.transmit.dao.TransmitDetailsMapper;
import com.alibaba.cloud.transmit.entity.TransmitDataDetails;
import com.alibaba.cloud.transmit.service.TransmitDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

@Service
public class TransmitDetailsServiceImpl implements TransmitDetailsService {

    @Autowired
    private TransmitDetailsMapper transmitDetailsMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void saveTransmitDataDetails(TransmitDataDetails transmitDataDetails) {

        transmitDataDetails.setCreateTime(new Date());
        transmitDetailsMapper.insert(transmitDataDetails);
    }
}
